package com.woniu.dao;


import com.woniu.entity.Admins;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author WenXin
 * @version 1.0
 * @description: TODO
 * @date 2022/8/22 11:07
 */
//dao层需要加映射注解
public interface ManagerDao {
    //增
    int insert(@Param("user") String user, @Param("pwd") String pwd);

    //删
    int delete(@Param("id") int id);

    //改
    int update(Admins admins);

    //查
    Admins findOne(@Param("id") int id);

    List<Admins> findAll();

    List<Admins> findByName(@Param("name") String userName);

    List<Admins> findById(@Param("ids") Integer[] ids);

    int addOneByMap(Map<String, Object> userInfo);

    int deleteByUserName(@Param("user") String username);
}
